using Kickball.Step2;
using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;

namespace Kickball.Step3
{
    public struct Ball : IComponentData
    {
    }

    public struct Velocity : IComponentData
    {
        public float2 Value;
    }

    public class BallAuthoring : MonoBehaviour
    {
        class Baker : Baker<BallAuthoring>
        {
            public override void Bake(BallAuthoring authoring)
            {
                var entity = GetEntity(TransformUsageFlags.Dynamic);
                AddComponent(entity, new Ball());
                AddComponent(entity, new Velocity());

                AddComponent(entity, new Carry());
                SetComponentEnabled<Carry>(entity, false);
            }
        }
    }
}